home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / biz / demo / MaVi1_0T1A.lha / InstallDemo next >
Text File  |  1998-02-10  |  4KB  |  194 lines

  1. ; script to install MaVi, based on the PPage example
  2.  
  3.     ; set up a error cleanup routine
  4.  
  5. (onerror
  6.     (message "Die Installation wurde abgebrochen. Sie sollten eventuelle Teilinstallationen löschen.")
  7. )
  8.  
  9. (complete 0)
  10.  
  11.     ; just in case the installation was restarted
  12.  
  13.     ; see if this is really an update
  14.  
  15. (set is_update 0)
  16. (set installdest (getassign "MaVi" "a"))
  17.  
  18.     ; if update, be sure they want program in same place
  19.  
  20. (if installdest
  21.     (if (askbool
  22.             (prompt "Sie haben schon ein MaVi-System im Verzeichnis\n\n\""
  23.                     installdest
  24.                     "\"\n\ninstalliert.\nSoll diese Version überschrieben werden (nicht empfohlen)?"
  25.             )
  26.             (help
  27.                 "Wie es scheint, hatten Sie MaVi schon einmal auf diesem Rechner installiert. "
  28.                 "Da dies die Previewversion 1A ist, sollten Sie mit der Installation nur fortfahren, "
  29.                 "falls Sie diese Version erneut installieren wollen. Andernfalls können Sie diese "
  30.                 "Previewversion in ein anderes Verzeichnis installieren oder aber die Installation jetzt "
  31.                 "abbrechen."
  32.             )
  33.             (default 1)
  34.         )
  35.  
  36.         (set is_update 1)        ; if user wants in same place
  37.  
  38.         (set installdest        ; if user wants in different place
  39.             (tackon
  40.                 (askdir
  41.                     (prompt "In welchem Verzeichnis soll der MaVi Ordner angelegt werden?")
  42.                     (help @askdir-help)
  43.                     (default @default-dest)
  44.                 )
  45.                 "MaVi"
  46.             )
  47.         )
  48.     )
  49. ; else
  50.     (set installdest
  51.         (tackon
  52.             (askdir
  53.                 (prompt "In welchem Verzeichnis soll der MaVi Ordner angelegt werden?")
  54.                 (help @askdir-help)
  55.                 (default @default-dest)
  56.             )
  57.             "MaVi"
  58.         )
  59.     )
  60. )
  61.  
  62. (if (not is_update)
  63.     (
  64.         (makedir installdest (infos))
  65.  
  66.         (tooltype
  67.             (dest installdest)
  68.             (noposition)
  69.         )
  70.     )
  71. )
  72. ; from now on I'll work with this assign
  73. (makeassign "MaVi" installdest)
  74.  
  75. ; now lock on to disk 1, Demo only
  76. (makeassign "installdisk1" "Disk1")
  77.  
  78.  
  79.  
  80.     ; at this point we have a valid destination, so we tell installer where
  81.     ; the application will end up so the exit page will be correct -- also,
  82.     ; the installation log file (if any) will be copied to the destination
  83. (set @default-dest installdest)
  84.  
  85. (complete 20)
  86.  
  87. ; these libraries are not only needed be mavi but may also be used by other programs
  88. ; or may already present on this system, so use copylib here
  89.  
  90. (copylib 
  91.     (source "installdisk1:libs/hrtool.library")
  92.     (dest "LIBS:")
  93. )
  94.  
  95. (copylib 
  96.     (source "installdisk1:libs/gaudio.library")
  97.     (dest "LIBS:")
  98. )
  99.  
  100. (copylib 
  101.     (source "installdisk1:libs/cyberext.library")
  102.     (dest "LIBS:")
  103. )
  104.  
  105. (copylib 
  106.     (source "installdisk1:libs/registry.library")
  107.     (dest "LIBS:")
  108. )
  109.  
  110. (copylib 
  111.     (source "installdisk1:libs/regprefs.library")
  112.     (dest "LIBS:")
  113. )
  114.  
  115. (copyfiles 
  116.     (source "installdisk1:devs/registry.new")
  117.     (dest "devs:")
  118. )
  119.  
  120. (copyfiles 
  121.     (source "installdisk1:devs/registry.old")
  122.     (dest "devs:")
  123. )
  124.  
  125. (makedir "MaVi:libs")
  126. (makedir "MaVi:libs/MaVi")
  127.  
  128. (if (not is_update)
  129.     (
  130.         ; do not use copylib here
  131.         (copyfiles
  132.             (source "installdisk1:libs/mavikey.library")
  133.             (dest "Mavi:Libs/Mavi/")
  134.         )
  135.  
  136.         (copyfiles 
  137.             (source "installdisk1:libs/mavititle.data")
  138.             (dest "Mavi:libs/Mavi/")
  139.         )
  140.     )
  141. )
  142.  
  143. ; unpack the archives to their destination, maybe later into a temp dir and then
  144. ; with copylib a version check
  145.  
  146. (run "installdisk1:cinst/lhX x installdisk1:font.lha fonts:")
  147. (run "installdisk1:cinst/lhX x installdisk1:images.lha MaVi:")
  148. (run "installdisk1:cinst/lhX x installdisk1:experimental.lha MaVi:")
  149.  
  150. ; remove the assign, demo only
  151. (makeassign "installdisk1")
  152. (complete 40)
  153.  
  154. ; now lock on to disk 2, Demo only
  155. (makeassign "installdisk2" "Disk2")
  156.  
  157. (copyfiles
  158.     (source "installdisk2:")
  159.     (dest "Mavi:")
  160.     (all)
  161. )
  162. (delete "mavi:disk.info" (safe))
  163.  
  164. ; remove the assign, demo only
  165. (makeassign "installdisk2")
  166.  
  167. (makedir "MaVi:Cache")
  168.  
  169. (complete 90)
  170.  
  171.     ; modify S:User-Startup
  172.  
  173. (startup "MaVi"
  174.     (prompt
  175.         "Einige Instruktionen müssen nun in die \"user-startup\" "
  176.         "eingefügt werden.")
  177.     (help "Ohne diese Instruktionen funktioniert MaVi nicht!")
  178.     (command
  179.         "ASSIGN MaVi: \"" installdest "\"\n"
  180.         "ASSIGN Images: MaVi:Images add\n"
  181.         "ASSIGN Libs: MaVi:Libs add\n"
  182.         "ASSIGN ImageCache: MaVi:Cache add\n"
  183.     )
  184. )
  185.  
  186.  
  187. (complete 100)
  188.  
  189. (message "MaVi wurde komplett installiert. Nach einem Neustart können Sie das System nutzen.")
  190.  
  191.     ; this is not strictly necessary, but doesn't hurt -- there is always
  192.     ; a default (exit) at the end of any script
  193. (exit)
  194.